<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='ttblsjxt'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="order" class="layui-form" id="form">

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='mjxx'/></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.member.username}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='mc'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.member.nickname}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='sjh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.member.mobile}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zcsj'/></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${order.member.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>
                </tbody>
            </table>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='sjxx'/></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.merchant.username}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='dpmc'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.merchant.shopName}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='xm'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.merchant.realName}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='sjh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.merchant.mobile}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='rzsj'/></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${order.merchant.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>
                </tbody>
            </table>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='ddxx'/></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddbh'/></td>
                    <td width="70%" style="border-color: black;">${order.orderNo}</td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddzt'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.status eq 1}"><fmt:message key='tjdd(dfk)'/></c:when>
                            <c:when test="${order.status eq 2}"><fmt:message key='fkcg(dfh)'/></c:when>
                            <c:when test="${order.status eq 3}"><fmt:message key='spck(dsh)'/></c:when>
                            <c:when test="${order.status eq 4}"><fmt:message key='ddqs(dpj)'/></c:when>
                            <c:when test="${order.status eq 5}"><fmt:message key='jywc'/></c:when>
                            <c:when test="${order.status eq 6}"><fmt:message key='ddqx'/></c:when>
                            <c:when test="${order.status eq 7}"><fmt:message key='yzfysdj'/></c:when>
                            <c:when test="${order.status eq 8}"><fmt:message key='dzfyswk'/></c:when>
                            <c:when test="${order.status eq 9}"><fmt:message key='xxzz-dsh'/></c:when>
                            <c:when test="${order.status eq 10}"><fmt:message key='dbfsh'/></c:when>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddlx'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.marketingType eq 0}"><fmt:message key='ptdd'/></c:when>
                            <c:when test="${order.marketingType eq 1}"><fmt:message key='zphddd'/></c:when>
                            <c:when test="${order.marketingType eq 2}"><fmt:message key='pthddd'/></c:when>
                            <c:when test="${order.marketingType eq 3}"><fmt:message key='tjhddd'/></c:when>
                            <c:when test="${order.marketingType eq 4}"><fmt:message key='mshddd'/></c:when>
                            <c:when test="${order.marketingType eq 5}"><fmt:message key='yshddd'/></c:when>
                        </c:choose>
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='xdsj'/></td>
                    <td width="70%" style="border-color: black;"><fmt:formatDate value="${order.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='spjgxj'/></td>
                    <td width="70%" style="border-color: black;"><fmt:formatNumber value="${order.goodsSubtotalPrice}" type="CURRENCY"/></td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='yf'/></td>
                    <td width="70%" style="border-color: black;"><fmt:formatNumber value="${order.freightPrice}" type="CURRENCY"/></td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddzj'/></td>
                    <td width="70%" style="border-color: black;"><fmt:formatNumber value="${order.price}" type="CURRENCY"/></td>
                </tr>


                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='spzj'/></td>
                    <td width="70%" style="border-color: black;">${order.goodsQuantity}</td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shsj'/></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${order.receiptTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>


                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shr'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.deliveryName}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shdz'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.deliveryProvince}${order.deliveryCity}${order.deliveryArea}${order.deliveryAddress}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shrdh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.deliveryMobile}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fhwlgs'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.expressCompany}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fhwldh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.expressesNo}
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddbz'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.note}
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='sfkjfp'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.haveInvoice eq 1}"><fmt:message key='bkfp'/></c:when>
                            <c:when test="${order.haveInvoice eq 2}"><fmt:message key='kjfp'/></c:when>
                        </c:choose>
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fpttlx'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.invoiceTitleType eq 1}"><fmt:message key='qy1'/></c:when>
                            <c:when test="${order.invoiceTitleType eq 2}"><fmt:message key='gr'/></c:when>
                        </c:choose>
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fplx'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.invoiceType eq 1}"><fmt:message key='pp'/></c:when>
                            <c:when test="${order.invoiceType eq 2}"><fmt:message key='zp1'/></c:when>
                        </c:choose>
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fptt'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.invoiceTitle}
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fpsh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.invoiceTFN}
                    </td>
                </tr>



                </tbody>
            </table>


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='zfxx'/></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zfzt'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.payStatus eq 1}"><fmt:message key='yzf'/></c:when>
                            <c:when test="${order.payStatus eq 2}"><fmt:message key='wzf'/></c:when>
                            <c:otherwise><fmt:message key='wzf'/></c:otherwise>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zffs'/></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${order.payMethod eq 1}"><fmt:message key='wx'/></c:when>
                            <c:when test="${order.payMethod eq 2}"><fmt:message key='zfb'/></c:when>
                            <c:when test="${order.payMethod eq 3}"><fmt:message key='qbye'/></c:when>
                            <c:when test="${order.payMethod eq 4}"><fmt:message key='gwkzf'/></c:when>
                            <c:when test="${order.payMethod eq 5}"><fmt:message key='xxzz'/></c:when>
                            <c:when test="${order.payMethod eq 6}"><fmt:message key='qbye'/></c:when>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zfsj'/></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${order.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zflsh'/></td>
                    <td width="70%" style="border-color: black;">
                            ${order.payNo}
                    </td>
                </tr>
                </tbody>
            </table>


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='gmqd'/></legend>
            </fieldset>

            <table class="layui-table">
                <thead>
                <th style="border-color: black;"><fmt:message key='sptp'/></th>
                <th style="border-color: black;"><fmt:message key='spmc'/></th>
                <th style="border-color: black;"><fmt:message key='dj1'/></th>
                <th style="border-color: black;"><fmt:message key='hh'/></th>
                <th style="border-color: black;">SKU</th>
                <th style="border-color: black;"><fmt:message key='sl'/></th>
                <th style="border-color: black;"><fmt:message key='kc'/></th>
                <th style="border-color: black;"><fmt:message key='xj1'/></th>
                </thead>
                <tbody>
                <c:forEach items="${order.details}" var="detail">

                    <tr>
                        <td style="border-color: black;"><img class="preview" style="width:40px;" src="${store_domain}/uploads/${detail.defaultImage}"/></td>
                        <td style="border-color: black;">${detail.goodsName}</td>
                        <td style="border-color: black;"><fmt:formatNumber value="${detail.sku.price}" type="CURRENCY"/></td>
                        <td style="border-color: black;">${detail.productNo}</td>
                        <td style="border-color: black;">${detail.specs}</td>
                        <td style="border-color: black;">${detail.quantity}</td>
                        <td style="border-color: black;">${detail.sku.store}</td>
                        <td style="border-color: black;"><fmt:formatNumber value="${detail.price}" type="CURRENCY"/></td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="8" style="text-align: right;border-color: black;"><b style="color:red;"><fmt:message key='hj'/>：<fmt:formatNumber value="${order.price}" type="CURRENCY"/></b>&nbsp;&nbsp;<fmt:message key='hyf'/>（<fmt:formatNumber value="${order.freightPrice}" type="CURRENCY"/>）</td>
                </tr>
                </tbody>
            </table>


            <c:if test="${order.marketingType == 1}">

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='zpqd'/></legend>
            </fieldset>

            <table class="layui-table">
                <thead>
                <th style="border-color: black;"><fmt:message key='sptp'/></th>
                <th style="border-color: black;"><fmt:message key='spmc'/></th>
                <th style="border-color: black;"><fmt:message key='spbh'/></th>
                </thead>
                <tbody>
                <c:forEach items="${giftgoodses}" var="goods">
                    <tr>
                        <td style="border-color: black;"><img class="preview" style="width:40px;" src="${store_domain}/uploads/${goods.defaultImage}"/></td>
                        <td style="border-color: black;">${goods.name}</td>
                        <td style="border-color: black;">${goods.goodsNo}</td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="8" style="text-align: right;border-color: black;"><b style="color:red;">合计：<fmt:formatNumber value="${order.price}" type="CURRENCY"/></b>&nbsp;&nbsp;<fmt:message key='hyf'/>（<fmt:formatNumber value="${order.freightPrice}" type="CURRENCY"/>）</td>
                </tr>
                </tbody>
            </table>
            </c:if>


        </form:form>
    </div>
</div>

<script>

    $(function () {

        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });

    });
</script>
</body>
</fmt:bundle>
</html>